﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms.Design;
using System.ComponentModel.Design;
using System.Windows.Forms;

namespace ProgNetComponentsDx.Controls.Design.Designers
{
    internal class MultiGroupPanelDesigner : CollapsiblePanelDesigner
    {
        #region  Overriden Properties

        //public override SelectionRules SelectionRules
        //{
        //    get { return SelectionRules.Locked; }
        //}

        #endregion  Overriden Properties

        #region  Public Overridden Methods

        public override bool CanBeParentedTo(IDesigner parentDesigner)
        {
            return parentDesigner != null && parentDesigner.Component is MultiGroupControl;
        }

        #endregion  Public Overridden Methods

        #region  Protected Overridden Methods

        protected override void OnPaintAdornments(PaintEventArgs pe)
        {
            base.OnPaintAdornments(pe);

            if (!(this.Control is Panel) || ((Panel)this.Control).BorderStyle == BorderStyle.None)
            {
                // outline the control at design time if we don't have any borders
                ControlPaint.DrawFocusRectangle(pe.Graphics, this.Control.ClientRectangle);
            }
        }
        protected override void PostFilterProperties(System.Collections.IDictionary properties)
        {
            properties.Remove("Dock");
            base.PostFilterProperties(properties);
        }
        #endregion  Protected Overridden Methods
    }
}
